#ifndef MyBaseClassH
#define MyBaseClassH
//---------------------------------------------------------------------------
#include "MyUtility.h"
#include "MyIniManager.h"
using namespace std;
//---------------------------------------------------------------------------
#define ITALIAN_LANG        0x670
#define ENGLISH_LANG        0x671
//---------------------------------------------------------------------------
#define BASECLASS_VER       0x10
//---------------------------------------------------------------------------
typedef struct{
    bool AppendDataToLog;
}BaseClass_Conf;
//---------------------------------------------------------------------------
#ifdef MY_BORLAND
class PACKAGE MyBaseClass
#else
class MyBaseClass: public MyUtility
#endif
{
	public:
		MyBaseClass(void);
#ifdef MY_BORLAND		
		MyUtility *Utility;
#endif		
		virtual void ManageDebugMsg(DWORD DbgLevel, char *Format, ...);
		virtual void ManageError(DWORD Code, DWORD SubCode, void *Add_Data,DWORD DbgLevel,char *Format,...);
		virtual void ManageWarning(DWORD Code, DWORD SubCode, void *Add_Data,DWORD DbgLevel,char *Format,...);
		virtual char *TranslateErrorMsg(DWORD Code, DWORD SubCode, DWORD Lang);
		virtual char *TranslateWarningMsg(DWORD Code, DWORD SubCode, DWORD Lang);		
		virtual char *TranslateMess(DWORD Code, DWORD Lang);
#ifdef MY_BORLAND		
		__property char* LogFile = {read = GetLogFile, write = setLogFile};
		__property DWORD Language = {read = GetLanguage, write = SetLanguage};
		__property DWORD BaseClassVersion = {read = GetBaseClassVersion};	
		__property BaseClass_Conf BaseClass_Configuration = {read = GetBaseClassConf, write = SetBaseClassConf};        	
#else
        virtual void OnDebugMsg(DWORD Level, char *Mess);		
		char *GetLogFile();
		void setLogFile(char *F);	
		DWORD GetBaseClassVersion();                
		virtual void SetLanguage(DWORD NewLang);
		virtual DWORD GetLanguage();	
		virtual void SetBaseClassConf(BaseClass_Conf Value);
		virtual BaseClass_Conf GetBaseClassConf();		
#endif
	protected:
		char *FLogFile;
		char *FDbgName;
		void defaultDbgMsg(DWORD Level, char *Mess);
		DWORD FLanguage;
		BaseClass_Conf FBaseClass_Configuration;
#ifdef MY_BORLAND 		
		DWORD GetBaseClassVersion();
		virtual void SetLanguage(DWORD NewLang);
		virtual DWORD GetLanguage();
		virtual void SetBaseClassConf(BaseClass_Conf Value);
		virtual BaseClass_Conf GetBaseClassConf();
#endif
	private:
#ifdef MY_BORLAND        
		char *GetLogFile();
		void setLogFile(char *F);	
#endif		
		DWORD FBaseClassVersion;		
};
//---------------------------------------------------------------------------
#endif
